package ru.study.thinkin.tests;

import java.lang.reflect.InvocationTargetException;

interface Any {}

class Bird{}
class Goose implements Any {}
class Duck extends Bird {
	public  Duck() {}
	Duck(String s) {
		System.out.println(s);
	}
}

public class TestCall <T extends Any> {
	
/*	public T getBack(Object o) {
		return o;
	}
*/	
	static Bird get() {
		return new Duck();
	}
	
	public static void main(String[] args) {
		System.out.println(get().getClass().getSimpleName());
		Class <Duck> c = Duck.class;
		try {
			Duck d  = (Duck) c.getDeclaredConstructor(Bird.class).newInstance("qqq");
		} catch (Exception e) {
			e.printStackTrace();
		}		
		//Class <String> c1 = Bird.class;
		
	}
}
